package com.ljc.mapper;

import com.ljc.entity.UserFollowing;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserFollowingMapper {
    /**
     * 根据当前用户 id 和 关注对象 id 删除关注关系
     */
    Integer deleteUserFollowing(@Param("userId") Long userId, @Param("followingId") Long followingId);

    /**
     * 新建和该用户的关注关系
     */
    Integer addUserFollowing(UserFollowing userFollowing);

    /**
     * 根据id 获取用户的关注关系
     */
    List<UserFollowing> getUserFollowings(Long userId);

    /**
     * 根据用户id获取该用户的粉丝
     */
    List<UserFollowing> getUserFans(Long userId);
}
